<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
  .box{

    color:red;
    border: 2px solid purple;
  }
  .box p{
    /* 元素本身不具有继承性，但是我们可以在后边加上inherit来进行强制继承 */
    /* 很少用 */
border:  inherit;

  }
  
  
  
  </style>
</head>
<body>
  <div class="box">

<p>我是p元素</p>
<h1>我是h1元素</h1>








  </div>
  

</body>
</html>